import { Flag } from '@keira/shared/constants';

export const UNIT_FLAGS: Flag[] = [
  { bit: 0, name: 'SERVER_CONTROLLED' },
  { bit: 1, name: 'NON_ATTACKABLE - Cannot be attacked by Players or NPCs but can still attack players' },
  { bit: 2, name: 'DISABLE_MOVE' },
  { bit: 3, name: 'PLAYER_CONTROLLED - controlled by player, use _IMMUNE_TO_PC instead of _IMMUNE_TO_NPC' },
  { bit: 4, name: 'RENAME' },
  { bit: 5, name: "PREPARATION - don't take reagents for spells with SPELL_ATTR5_NO_REAGENT_WHILE_PREP" },
  { bit: 6, name: 'UNK_6 - not sure what it does, but it is needed to cast nontriggered spells in smart_scripts' },
  { bit: 7, name: 'NOT_ATTACKABLE_1 - Cannot be attacked by Players or NPCs but can still attack players' },
  { bit: 8, name: 'IMMUNE_TO_PC - disables combat/assistance with PlayerCharacters (PC)' },
  { bit: 9, name: 'IMMUNE_TO_NPC - disables combat/assistance with NonPlayerCharacters (NPC)' },
  { bit: 10, name: 'LOOTING - loot animation' },
  { bit: 11, name: 'PET_IN_COMBAT' },
  { bit: 12, name: 'PVP' },
  { bit: 13, name: 'SILENCED - Can’t cast spells' },
  { bit: 14, name: 'UNK_14' },
  { bit: 15, name: 'UNK_15 - Only Swim ' },
  { bit: 16, name: 'UNK_16 - No Attack 2 - Cannot be attacked by Players or NPCs but can still attack players' },
  { bit: 17, name: 'PACIFIED - Creature will not attack' },
  { bit: 18, name: 'STUNNED' },
  { bit: 19, name: 'IN_COMBAT' },
  { bit: 20, name: 'TAXI_FLIGHT - disable casting at client side spell not allowed by taxi flight ' },
  { bit: 21, name: 'DISARMED - disable melee spells casting' },
  { bit: 22, name: 'CONFUSED' },
  { bit: 23, name: 'FLEEING - feared' },
  { bit: 24, name: 'POSSESSED - under direct client control by a player (possess or vehicle)' },
  {
    bit: 25,
    name: 'NOT_SELECTABLE - No name text shown, no nameplate shown and can’t be selected by mouse or with /target {name} command.',
  },
  { bit: 26, name: 'SKINNABLE' },
  { bit: 27, name: 'MOUNT - The client seems to handle it perfectly. Also used when making custom mounts.' },
  { bit: 28, name: 'UNK_28 - PreventKneelingWhenLooting' },
  {
    bit: 29,
    name: 'PREVENT_EMOTES_FROM_CHAT_TEXT - Prevent automatically playing emotes from parsing chat text, for example "lol" in /say, ending message with ? or !, or using /yell',
  },
  { bit: 30, name: 'SHEATHE' },
  { bit: 31, name: 'UNK_31' },
];
